from robot.libraries.BuiltIn import BuiltIn
from comm_lib.util import Util


class IosVerify(object):
    @staticmethod
    def verify_status_code():
        code = BuiltIn().run_keyword('get status code')
        Util.str_assert(code, '200')

    def verify_response_status(self):
        response = BuiltIn().run_keyword('get resp json')
        status = response.get('status')
        Util.str_assert('1', status)
        self.verify_status_code()
